package com.ruoyi.system.domain.aggregation;

import java.math.BigDecimal;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 用户商家绑定记录对象 user_merchant_binding
 * 
 * @author ruoyi
 * @date 2025-01-10
 */
public class UserMerchantBinding extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 绑定ID */
    private Long id;

    /** 用户ID */
    @Excel(name = "用户ID")
    private Long userId;

    /** 商家ID */
    @Excel(name = "商家ID")
    private Long merchantId;

    /** 商家名称 */
    @Excel(name = "商家名称")
    private String merchantName;

    /** 绑定类型 */
    @Excel(name = "绑定类型", readConverterExp = "first_consume=首次消费,manual=手动绑定")
    private String bindingType;

    /** 首次消费订单ID */
    @Excel(name = "首次消费订单ID")
    private Long firstOrderId;

    /** 首次消费金额 */
    @Excel(name = "首次消费金额")
    private BigDecimal firstOrderAmount;

    /** 绑定时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "绑定时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date bindingTime;

    /** 绑定过期时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "绑定过期时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date expireTime;

    /** 是否有效 */
    @Excel(name = "是否有效", readConverterExp = "1=有效,0=无效")
    private Integer isActive;

    /** 解绑时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "解绑时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date unbindTime;

    /** 解绑原因 */
    @Excel(name = "解绑原因")
    private String unbindReason;

    /** 解绑操作人 */
    @Excel(name = "解绑操作人")
    private Long unbindBy;

    public void setId(Long id) 
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }
    public void setUserId(Long userId) 
    {
        this.userId = userId;
    }

    public Long getUserId() 
    {
        return userId;
    }
    public void setMerchantId(Long merchantId) 
    {
        this.merchantId = merchantId;
    }

    public Long getMerchantId() 
    {
        return merchantId;
    }
    public void setMerchantName(String merchantName) 
    {
        this.merchantName = merchantName;
    }

    public String getMerchantName() 
    {
        return merchantName;
    }
    public void setBindingType(String bindingType) 
    {
        this.bindingType = bindingType;
    }

    public String getBindingType() 
    {
        return bindingType;
    }
    public void setFirstOrderId(Long firstOrderId) 
    {
        this.firstOrderId = firstOrderId;
    }

    public Long getFirstOrderId() 
    {
        return firstOrderId;
    }
    public void setFirstOrderAmount(BigDecimal firstOrderAmount) 
    {
        this.firstOrderAmount = firstOrderAmount;
    }

    public BigDecimal getFirstOrderAmount() 
    {
        return firstOrderAmount;
    }
    public void setBindingTime(Date bindingTime) 
    {
        this.bindingTime = bindingTime;
    }

    public Date getBindingTime() 
    {
        return bindingTime;
    }
    public void setExpireTime(Date expireTime) 
    {
        this.expireTime = expireTime;
    }

    public Date getExpireTime() 
    {
        return expireTime;
    }
    public void setIsActive(Integer isActive) 
    {
        this.isActive = isActive;
    }

    public Integer getIsActive() 
    {
        return isActive;
    }
    public void setUnbindTime(Date unbindTime) 
    {
        this.unbindTime = unbindTime;
    }

    public Date getUnbindTime() 
    {
        return unbindTime;
    }
    public void setUnbindReason(String unbindReason) 
    {
        this.unbindReason = unbindReason;
    }

    public String getUnbindReason() 
    {
        return unbindReason;
    }
    public void setUnbindBy(Long unbindBy) 
    {
        this.unbindBy = unbindBy;
    }

    public Long getUnbindBy() 
    {
        return unbindBy;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("userId", getUserId())
            .append("merchantId", getMerchantId())
            .append("merchantName", getMerchantName())
            .append("bindingType", getBindingType())
            .append("firstOrderId", getFirstOrderId())
            .append("firstOrderAmount", getFirstOrderAmount())
            .append("bindingTime", getBindingTime())
            .append("expireTime", getExpireTime())
            .append("isActive", getIsActive())
            .append("unbindTime", getUnbindTime())
            .append("unbindReason", getUnbindReason())
            .append("unbindBy", getUnbindBy())
            .toString();
    }
}
